
function loginService(){
	function getUuid() {
		return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
			var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
			return v.toString(16);
		});
	}
	/*var baseUrl = "http://192.168.2.169:8080/";*/   
	var baseUrl = "http://192.168.2.9:8080/learn/";
	var uuid = getUuid();
	var sid = "";
	$("#uuid").val(uuid);
	$("#validateImg").attr("src",baseUrl+"servlet/validateCodeServlet?uuid="+uuid);
	$(function () {
		/*ajax登录*/
		$("#ajaxLogin").click(function () {
			var url = baseUrl+"a/login";
			$.post(url, $("#loginFrom").serializeArray(), function (d) {
				console.log(d);
				var data = $.parseJSON(d);
				if(data.success){
					$("#sid").val(data.sessionId);//存session
				}else {
					$(".warming").text(data.message);
				}
			});
		});
		$(".change").click(function () {
			$("#validateImg").attr("src","");
			$("#validateImg").attr("src",baseUrl+"servlet/validateCodeServlet?uuid="+uuid+"&"+new Date().getTime());
		});
	});
}